<!DOCTYPE>
<html>
<head>
  <title>Change popup to list inside mouse event handler.</title>
  <script type="text/javascript" charset="utf-8">
    if (window.testRunner)
      testRunner.dumpAsText();

    function sendClick()
    {
      var select = document.getElementById("select");

      eventSender.mouseMoveTo(select.offsetLeft + 4, select.offsetTop + 4);
      eventSender.mouseDown(1);
    }
    
    window.addEventListener('load', sendClick, false);
  </script>
</head>
<body>
  <p>This test should not crash.</p>
  <select id="select" onFocus="this.size = 10">
    <option value="0">One</option>
    <option value="1">Two</option>
    <option value="2">Three</option>
  </select>
</body>
</html>
